home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / C-D / DeveloperStax.cpt / Developer Stack 1.1 / card_9929.txt < prev    next >
Text File  |  1989-02-26  |  2KB  |  71 lines

  1. -- card: 9929 from stack: in.1
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 3837
  5. -- name: DeleteMenu
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A003
  11. -- rect: left=82 top=302 right=324 bottom=182
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Install
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   if the optionkey is down then pass mouseup
  23.   put installres(XFCN,DeleteMenu) into it
  24.   if it is empty then play oops
  25.   else answer it
  26. end mouseUp
  27.  
  28.  
  29.  
  30. -- part contents for background part 5
  31. ----- text -----
  32. DeleteMenu
  33.  
  34. -- part contents for background part 10
  35. ----- text -----
  36. 5
  37.  
  38. -- part contents for background part 6
  39. ----- text -----
  40.  
  41. DeleteMenu allows you to delete any menus you've added to HyperCard using the NewMenu* XFCN.  Failure to delete added menus could lead to severe problems in memory and crash HyperCard!
  42.  
  43. The menu reference number you provide to to DeleteMenu should be the same number that was returned by NewMenu*.
  44.  
  45. Do NOT, however, call DeleteMenu to delete menus that you've already deleted!  You need to balance the calls for each menu.  Call NewMenu* ONCE to create a menu 
  46. (usually in either openStack, openBackground or openCard), and call DeleteMenu ONCE to delete it 
  47. (in the matching closeStack, closeBackground, or closeCard).  
  48.  
  49. Repeat as neccessary.  Rinse.
  50.  
  51. For the best example of use see the sample script provided in NewMenu*.
  52.  
  53. All the credit, (even the descriptions above) go to the creator of this ingenious XFCN:
  54.  
  55. Nine to Five Software Company
  56. P.O. Box 915
  57. Greenwood, IN  46142
  58. (317) 887-2154
  59. & Michael Long
  60.  
  61. See also CheckMenu*, EnableMenu*, NewMenu*, and ChangeMenu*.
  62.  
  63.  
  64. -- part contents for background part 7
  65. ----- text -----
  66. Syntax:
  67.  
  68. put DeleteMenu(menuNumber) into MenuIDGlobal
  69.  
  70.  
  71. menuNumber is the number returned by the original newMenu call.